﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OntologyUtility.Xml;
namespace OntologyFormDesigner
{
    public class XMLModelWriter
    {
        private static XMLModelWriter instance = null;
        public XmlWriter xml { get; set; }

        private XMLModelWriter() {
            xml = new XmlWriter();
        }

        public static XMLModelWriter Instance {
            get 
            {
                if (instance == null)
                {
                    instance = new XMLModelWriter();
                }
                return instance;
            }   
        }
    }

    public class XMLModelReader
    {
        private static XMLModelReader instance = null;
        public XmlReader xml { get; set; }

        private XMLModelReader()
        {
            xml = new XmlReader();
        }

        public static XMLModelReader Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new XMLModelReader();
                }
                return instance;
            }
        }

        public void read (String path, ref Object obj)
        {
            new Class1().readXml(path, ref obj);
        }
    }
}
